package com.example.yuejian21.nongfusanquan.yuejian21.model;

import com.example.yuejian21.nongfusanquan.yuejian21.javabean.Activitybean;
import com.example.yuejian21.nongfusanquan.yuejian21.javabean.Matchbean;
import com.example.yuejian21.nongfusanquan.yuejian21.service.ActivityService;
import com.example.yuejian21.nongfusanquan.yuejian21.service.MatchService;

import java.util.List;

import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by Nongfusanquan on 2017-10-24.
 */

public class Matchmodel {
    private Retrofit retrofit;
    public Matchmodel() {
        retrofit = new Retrofit.Builder()
                .baseUrl("http://10.0.2.2/yuejian14/index.php/API/")
                .addConverterFactory(GsonConverterFactory.create())
                .build();
    }
    public Call<List<Matchbean>> getmatcheslist(){
        MatchService activityService = retrofit.create(MatchService.class);
        return activityService.getallmatches();
    }
}
